package hostsystem;

import java.sql.*;

public class hostdb {
	static {
		try {
			Class.forName("com.mysql.jdbc.Driver");
		} catch (ClassNotFoundException e) {
			throw new RuntimeException(e);
		}
	}

	public static Connection getConnection() {

		try {
			Connection con = DriverManager.getConnection(
					"jdbc:mysql://localhost/hostsystem", "root", "");
			con.setAutoCommit(false);
			con.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
			return con;
		} catch (SQLException e) {
			throw new RuntimeException(e);
		}

	}
}
